package com.niu1078.order.data.api

import com.niu1078.base.data.protocol.BaseResp
import com.niu1078.order.data.protocol.*
import retrofit2.http.Body
import retrofit2.http.POST
import rx.Observable

/**
 * author :ywq .
 * time: 2018/1/3:15:17.
 * desc :订单 接口
 * action:
 */
interface OrderApi {

    /*
    取消订单
     */
    @POST("order/cancel")
    fun cancelOrder(@Body req: CancelOrderReq):Observable<BaseResp<String>>


    /*
    确认订单
     */
    @POST("order/confirm")
    fun confirmOrder(@Body req: ConfirmOrderReq):Observable<BaseResp<String>>


    /*
    根据id获取订单
     */
    @POST("order/getOrderById")
    fun getOrderById(@Body req: GetOrderByIdReq):Observable<BaseResp<Order>>


    /*
        根据订单状态查询查询订单列表
     */
    @POST("order/getOrderList")
    fun getOrderList(@Body req: GetOrderListReq): Observable<BaseResp<MutableList<Order>?>>

    /*
        提交订单
     */
    @POST("order/submitOrder")
    fun submitOrder(@Body req: SubmitOrderReq): Observable<BaseResp<String>>






}